﻿
<style>

.stopped {color:#aaa;}
.stopped td a { color:#aaa;}
.templateCmd { cursor:pointer; margin-left:10px;}

.cmdStart { color:red; font-weight:bold;}

</style>

<div style="margin-bottom:10px;border:1px solid #ccc; padding:10px 10px; background:#fff;">
采集功能使用说明：<a href="http://www.wojilu.com/forum1/topic/3021" target="_blank" style="font-size:12px;">http://www.wojilu.com/forum1/topic/3021 <img src="~img/s/external-link.png" /></a>
</div>


<table style="width: 100%" id="dataAdminList" data-sortAction="#{sortAction}">	<tr class="adminBar">
		<td colspan="5"><a href="#{addUrl}"><img src="~img/add.gif"/> 添加采集模板</a></td>
	</tr>
        <tr class="tableHeader">
            <td>排序ID</td>
            <td>采集模板名称</td>
            <td>列表页网址</td>
            <td>刷新</td>
            <td>管理</td>
        </tr>
        <!-- BEGIN list -->
        <tr class="tableItems #{rowStatus}">
			<td class="sort">
				<img src="~img/up.gif" class="cmdUp right10" data-id="#{s.Id}"/>
				<img src="~img/dn.gif" class="cmdDown" data-id="#{s.Id}"/>
			</td>
            <td>
                #{s.SiteName}</td>
            <td class="rowTitle"><a href="#{s.ListUrl}" target="_blank">#{s.ListUrl}</a></td>
            <td><a href="#{s.RefreshUrl}">现在采集</a></td>
            <td>
                <a href="#{s.EditUrl}">修改</a>
                <span class="templateCmd">#{s.Cmd}</span>
                
                <a href="#{s.DeleteUrl}" class="deleteCmd left10">删除</a>
                    
            </td>
        </tr><!-- END list -->
        <tr><td colspan="5">#{page}</td></tr>
    </table>
    
<script>
_run( function() {

    $('.cmdStop').click( function() {
        var url = $(this).attr( 'href' );
        $.post( url.toAjax(), function(data) {
            if( data=='ok' ) {
                wojilu.tool.reloadPage();
            }
            else {
                alert( data );
            }
        });
        
    });
    
    $('.cmdStart').click( function() {
        var url = $(this).attr( 'href' );
        $.post( url.toAjax(), function(data) {
            if( data=='ok' ) {
                wojilu.tool.reloadPage();
            }
            else {
                alert( data );
            }
        });
        
    });

});
</script>